 <{extends file="<{$tempdir}>/public/site.html"}>  
 <{block name=extendcss}>
 <link rel="stylesheet" type="text/css" href="<{$siteurl}>/templates/<{$tempdir}>/public/css/ask.css"> 
 <{/block}>
 <{block name=sitetitle}>在线留言<{/block}>
<{block name=bodylist}>
<div class="MsgFrm">
	 
	<div class="MsgRightFrm" style="width:1200px;">
		 
		<div class="MsgLeaveForm">
			<div class="MsgLeaveHead"><img src="<{$imgserver}><{$member['logo']|default:$userlogo}>"   width="50" height="50"></div>
			<div class="MsgForm">
                <form action="" method="post" id="saveform" name="saveform">
				<textarea datatype="*1-200" nullmsg="请输入留言信息！" errormsg="留言信息最多200个字符！" class="MsgTxt" name="content" id="liuyan_textarea"></textarea>
			
				<div style="clear:both;"></div>
				<div style="padding-top:20px;"> <input type="radio" name="typeid" value="1">网站建议
					<input type="radio" name="typeid" value="2">问题
					<input type="radio" name="typeid" value="3">催单
					<input type="radio" name="typeid" value="4">投诉申告
					<input type="radio" name="typeid" value="5">其他
				 
					</div>
					<{if $member['uid'] > 0}>
				<div style="padding-top:20px;">	<a href="javascript:void(0);" onclick="fabu();" class="BtnSubMsg"></a> </div>
				<{else}>
				<div style="padding-top:20px;">	未登陆不可留言，想留言请先进行<a href="<{ofunc type=url link="/member/login"}>">登陆</a></div>
				<{/if}>
                </form>
                
                
             
			</div>
			<div style="clear:both;"></div>
		</div>
		<!-- MsgList start -->
		<div class="MsgList">
			<ul id="MList" scrollpagination="enabled"> 
			 <{load_data assign="list" table="ask" showpage="true" where="shopid = 0"  orderby = "id desc"}> 
			<{foreach from=$list['list'] item=items}>
			<{load_data assign="userinfo" table="member" type="one" where="uid='<{$items['uid']}>'" fileds="username" }> 
				<li id="M_599" u="690" rel="loaded">
					<div class="UserHead"><a href="#"><img src="<{$imgserver}><{$userinfo['logo']|default:$userlogo}>"></a></div>
					<div class="MsgInfo">
						<div class="MITitle">
                        <a href="javascript:;" <a="" class="Name" id="N_599"><{$userinfo['username']|default:"游客"}></a> <span class="Levels l03" title="经验值：401点"></span> — <{$items['addtime']|date_format:"%Y-%m-%d %H:%M:%S"}>
                        </div>
						<div class="MILeave" id="C_599"><{$items['content']}></div>
                        <div id="MRList_599"> 
                        	<{if !empty($items['replycontent'])}>
                        <div id="MR_65" class="MsgReply">
                        	<a href="#" class="MsgCustomerService">
                              (<b style="color:Red;"><{$sitename}>客服</b>)</a>发表于: <{$items['replytime']|date_format:"%Y-%m-%d %H:%M:%S"}>
                            <br>
                            <{$items['replycontent']}><span class="MsgReplyIcon"></span>
                        </div>
                         <{/if}> 
                        </div>
					</div>
           <div style="clear:both;"></div>
				</li>
				<{/foreach}> 
				
				 </ul>
		</div>
          <div class="MoreMsg">
        	<div class="show_page">
        		 <ul>
             <{$list['pagecontent']}>
           </ul>
          </div>
        </div>
       <input type="hidden" name="pageshow" id="pageshow" value="1" data="1">
		<!-- MsgList end -->
	</div>
	<div style="clear:both;"></div>
</div>
 
 
<script>
	function fabu()
	{
		var shopid = $('#nowshopid').val();
		if(shopid == undefined)
		{
			shopid = 0;
		
		}
		if($('#liuyan_textarea').val() == '')
		{
			diaerror('留言内容不能为空'); 
				return false;
		}
		var typeid = $("input[name='typeid']:checked").val();
		if(typeid ==  undefined){
		  	diaerror('留言类型不能为空'); 
				return false;
		}
		var info = {'content':$('#liuyan_textarea').val(),'shopid':'0','Captcha':'','type':typeid};
		var backmes =   ajaxback('<{ofunc type=url link="/ask/saveask/datatype/json"}>',info); 
		if(backmes.flag == false)
		{
			artsucces('操作成功');
			location.reload();  
		}else{
			diaerror(backmes.content); 
		} 
	} 

</script>
 <script>
$(function(){ 
 $('.show_page a').wrap('<li></li>');
 $('.show_page').find('.current').eq(0).parent().css({'background':'#f60'}); 
});
   
</script>
<div style="height:20px;clear:both;"></div>
<{/block}>